//
//  ExtendSelector.h
//  etionUI
//
//  Created by wangjian on 12/10/13.
//  Copyright (c) 2013 GuangZhouXuanWu. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface CExtendColorSelector : UIControl

@property (nonatomic, assign) NSUInteger curColorIndex;
@property (nonatomic, assign) NSUInteger curWidthIndex;
@property (nonatomic, retain) NSArray *arColors;
@property (nonatomic, retain) NSArray *arWidths;
@property (nonatomic, readonly) UIColor *curColor;
@property (nonatomic, readonly) CGFloat curWidth;
@property (nonatomic, readonly) BOOL bIsExtend;

- (void)setCurColorIndex:(NSUInteger)curColorIndex animated:(BOOL)animated;
- (void)setCurWidthIndex:(NSUInteger)curWidthIndex animated:(BOOL)animated;

- (void)extend;
- (void)shrink;

@end

typedef enum
{
    EExtendSelectorDirUp        = 1 << 0,
    EExtendSelectorDirDown      = 1 << 1,
} EExtendSelectorDir;

@interface CExtendItemSelector : UIControl

@property (nonatomic, assign) NSUInteger curSelectedIndex;
@property (nonatomic, assign) EExtendSelectorDir extendDir;
@property (nonatomic, readonly) BOOL bIsExtend;

- (id)initWithFrame:(CGRect)frame normalImages:(NSArray *)normalImages highlightedImages:(NSArray *)highlightedImages titles:(NSArray *)titles;
- (void)extend;
- (void)shrink;

@end

